Title: Remove the sidebar from WooCommerce pages on Storefront

Publish Date: Fri, 22 Jul 2016 07:28:26 +0000

Categories: Uncategorized

Content:

Are you using Storefront on your shop? If yes, you noticed maybe that your shop page, and all other WooCommerce pages such as product page, category archive, etc. always have a sidebar.



By default, there's not an option to remove it. Unless you use the Storefront extension Storefront WooCommerce Customizer



But there's also another way to remove it.







If you are into coding, you can unhook some Storefront actions to remove the sidebar on all WooCommerce pages, or only some of them, and with a bit of CSS you can increase the size of the main container.





Open your functions.php file in wp-content/themes/yuor-child-theme-name/ and add this code at the end of it:




https://gist.github.com/c289fe7f8d73f7df69d68af885ec617f




Now, open your child theme's style.css in the same location and add this code:




https://gist.github.com/e67a97c75c4f5633e716f737f852785e




Now, all your WooCommerce pages won't have a sidebar.



If you wish instead to remove it only from some pages, like only on product pages, you can change the condition on line 3 in the first PHP snippet and use a different WooCommerce conditional tag.
